In one aspect, this invention relates to a software analysis and rehosting system and method that automatically converts a computer program in a particular computer program dialect to another computer program dialect that can be a different version of the same dialect, or an entirely different dialect, or the same dialect, but for use on a different hardware platform. In another aspect, the invention relates to a software system and method that can be used to generate a translation model that would be used to convert a computer program in a particular dialect to another computer program in the same, related or different dialect. In still a further aspect, the invention relates to a software analysis system and method that analyzes an input computer program and generates a report. Thus, In general, the present invention relates to a computer software system, equipment, method and computer program which can be used by, among others, those in the automated test and measurement industry for rehosting, for analyzing and generating reports, and for creating a translation model.
With the world approaching the millennium, very valuable computer software written decades ago has become antiquated as new hardware has been developed and as software theories and management theories have changed. One area of software that has been greatly affected by these changes is the area of test programs (TP""s). These are a class of extremely valuable software programs grouped with interfacing hardware and associated documentation to form a Test Program Set (TPS). TPS""s are used with very expensive Automatic Test Equipment (ATE) hardware and software systems that have been built to test electronic components. A TPS is used to operate and control testing and monitoring equipment for the electronics test industry in support of the aerospace, defense, automotive, and telecommunications industries. These programs often contain tens of thousands of lines of code and have been written in computer languages which have been in existence for almost half a century. This class of so-called legacy program code is written in such languages as ATLAS, BASIC, JOVIAL, FORTRAN, etc.
In the field of aviation electronic test systems, there is a maintenance hierarchy which supports avionics testing. The first level of test is incorporated into the electronic module or Line Replaceable Unit (LRU) and is called a Built In Test (BIT). If an electronic module""s BIT detects an error, the module is checked at a flight line with organizational-level test equipment to check out the problem, and then removed and replaced from the aircraft if confirmed to be faulty. The defective module is then taken to an intermediate-level ATE station for testing by a test station. The intermediate-level test system performs extensive testing to identify and isolate any failed circuit cards in the module. Faulty circuit cards are removed and replaced and the module is returned to operational condition for use in the aircraft. Faulty circuit cards, which were identified and removed as part of module testing are shipped to a regional repair center which has depot-level test equipment. The repair center tests the failed circuit card to identify and isolate any failed components. Faulty components are then removed and replaced, and the circuit card is repaired to an operational condition and returned for use again. A typical, conventional test station, depicted in FIG. 1 at 130, is shown in a schematic block diagram. A Unit Under Test (UUT) 132 is connected to test station 130 by a connector 134. Unit Under Test 132 can be, for example, electronic equipment from an aircraft or missile. Test station 130 runs an appropriate TPS, which is depicted at block 136.
Connector 134 is schematically shown in FIG. 1 as a cable, but more likely it would simply be a hardware connector unit having a highly configured arrangement. One of the problems with older systems is that the standardized hardware connector has changed. In an overly simplistic example, it would be similar to trying to plug a newer three-pin electric wire connector having a grounded pin into an older electric wall socket only having two pins. In the hardware connectors, there is also the problem that the newer connectors use different xe2x80x9cpin outs,xe2x80x9d or arrangement of connector pins. Testing of the equipment involves among other thing the application of test current and voltage signals. If the pin arrangement is not properly considered when these signals are being applied, it could be fatal to the equipment. TP""s control among other things the application of these test signals and thus a legacy TP can be pin specific.
Test station 130 is typically comprised of conventional, but usually specialized, computer hardware, depicted as block 140 and run by conventional system software shown as block 142. In a conventional test station, computer hardware could be a Pentium based computer running a modern Commercial Off The Shelf or COTS system software (e.g. Microsoft Windows NT operating system). A software interface 144 is connected to computer hardware 140, and can be as simplistic as specific drivers for other hardware equipment, such as drafting equipment or printers. Test station 130 also includes a hardware specific interface 146 that must correspond to connector 134 so that they can be plug and pin compatible. Finally, test station 130 includes a plurality of instruments 148, such as a Volt-Ohm Meter (VOM), that can be controlled by software and can be selectively connected to the UUT and selectively read and used by the TPS.
A TPS typically includes very expensive software. For example, in the military aircraft industry, where these systems must emulate an entire aircraft in order to test the electronic units, often the cost to develop a single test program may be several hundred thousand dollars.
Now with a dwindling defense budget and an increased availability of lower cost commercially based test instruments utilizing components based on VXI/PXI technology, re-hosting of legacy Test Programs (TPs) onto new test platforms is an attractive alternative to writing new software. An example of a management theory that has changed is the desire to switch from specially created software languages to COTS software environments. These changes have created an overwhelming task of migrating existing software written in one language or dialect to new test platforms which support different languages and dialects. As used herein, in order to avoid the difficult task of deciding whether two computer programs are of different versions of the same language or are of two different languages, the term xe2x80x9cdialectxe2x80x9d means a computer language or a version of a computer language.
Current practice is to migrate legacy test programs to modern industry leading commercially available programming environments. In this way major industries such as the military and avionics industries can take advantage of COTS tools for building their new test systems. These tools include PC plug-in boards, VXI/IVI plug-play instrument drivers, and LabVIEW and LabWindows/CVI test software tools, etc. This migration affords the industries the benefits from the high volumes, lower prices and better worldwide compatibility and support that are common with COTS tools. Unfortunately, any migration to modern programming environments has to consider either rewriting very valuable legacy computer software or manually converting it, both prospects being extremely time consuming and expensive because of the magnitude of the task. Thus, there is a need for a conversion tool that can accept legacy software (e.g., ATLAS, BASIC, JOVIAL, and FORTRAN), and produce software in a language or dialect that is compatible with the modern software environments (e.g., LabWindows/CVI, LabVIEW,Visual Basic, Visual C++, and new version of ATLAS).
Another current need is the ability to substitute or swap out one test instrument for either a similar one or an different version of the current one without expensive reprogramming of the affected TPS. As used herein, the term xe2x80x9ctest instrumentxe2x80x9d means any item that is used in the testing of an electronic unit and is controllable by software. Test instruments include: a Volt-Ohm Meter (VOM); a digital multimeter (DMM); an oscilloscope; a spectrum analyzer; an arbitrary wave form generator; an optical bench used to test a head-up display (HUD, a display that is in the field of view of a viewer who is looking straight ahead); a power supply; a relay; and a switch. As such, analysis and reporting of the legacy code is desired to derive the requirements for measurement or stimulus required by the replacement instrument.
It is now also desirable to use more modern computer languages in which to write TP""s (e.g. LabWindows/CVI, LabVIEW, Visual Basic, Visual C++ and new versions of ATLAS). Thus, there is also a need both to retain the capabilities of the legacy test programs and to migrate the legacy code to the modern languages.
There are some prior art United States patents which also discuss the aforementioned situation and problems, and which propose solutions. One type of solution is to convert the legacy test program from one dialect to another. Such conversion is usually called translation, recycling or rehosting. Examples of such patents which disclose prior art software rehosting systems include the following: U.S. Pat. No. 5,678,044 (1997) to Pastilha et al.; and U.S. Pat. No. 5,768,564 (1998) to Andrews et al., all incorporated in their entirety herein by reference.
The present invention overcomes the foregoing deficiencies and inadequacies of the prior art while providing a user friendly, interactive environment and tool that can be used to import, model, provide metrics data and convert code in one dialect to a new dialect in accordance with predefined criteria, and can be used to produce reports about a computer program in the source code version.
Accordingly it is an object of the present invention to provide an improved software rehosting system and method that overcomes the deficits and inadequacies of the prior art. In general and without limitation, it is an object of the present invention to provide a system that supports modeling of legacy and target dialects, such a system being able, for example, to extract test information from Test Program (TP) source code written in a legacy language/dialect (e.g., old versions of ATLAS, Ada, ANSI C, BASIC, and L200) and target it to a new Automatic Test Equipment (ATE) employing a modern programming language (e.g., LabWindows/CVI, LabVIEW, Visual Basic, Visual C++ and new versions of ATLAS). It is also an object of the present invention using the same software rehosting system to provide reports of statistical information about the input computer programs and to provide formatted outputs of the input computer programs to other conventional application programs such as spread sheet computer programs and flow charting computer programs.
The present invention provides multi-lingual support capability, and can be customized by the user. It provides an intuitive user-friendly graphical interface so that the user can model both legacy and target ATE languages and dialects, and can create translation models upon which the TPS code conversion is based. The present invention is also capable of identifying any code not resolved during the rehosting process. The present invention, in a specific embodiment thereof, automatically generates TPS metrics reports directly from the Test Program source code. These reports help the test engineer get detailed insight and understanding of the Test Program to facilitate TPS re-host activities. These reports can also be generated for newly generated Test Programs to assist in the technical/Quality Assurance review process for new TPS""s as well.
Accordingly, the present invention facilitates the re-hosting of a test program from one dialect to another based on user definable and extensible models. The present invention implements ActiveX technology which permits easy implementation into new application designs and allow such designs to be Internet web enabled while providing multi-platform support for ANSI-C, Visual Basic (VB), and Internet Explorer, to name just a few well known commercial programs. The present invention is much more than a translation tool, it is also a development tool that can be defined by the user. Models are defined by using a tree structure, place holders (i.e. variables) that are keyed to the specific program location of the source and target code that is to be preserved, and the user is given the ability to run specified routines at any model element level for automatic extensibility.
A specific embodiment of the present invention is object oriented with the capability to update, change and develop objects. This embodiment is user definable at the model level and utilizes user-developed routines in VB script format which can be stored on the user""s computer or network and selectively used for translation and reporting purposes. As such this embodiment can be used on more than one program. Building of a translation model can be done either manually or automatically utilizing a unique auto-model capability. A translation window is exposed to the user to permit easy model building and verification. Once the model is built using user selected exemplary code, the model can be used in an automatic mode to quickly convert all similar code, whether in the same program or in other programs written in the same dialect.
According to one specific embodiment of the present invention, there is provided an improved method for rehosting a legacy source code computer program having a plurality of statements of code separated by corresponding delimiters and a plurality of elements in each statement separated by a separator. The rehosting method includes entering said legacy computer program into a database stored in a computer memory; parsing said legacy computer program by removing said delimiters and storing each statement of code in a computer identifiable section of said data base; parsing each statement of said legacy computer program by removing said separators and storing each element in a computer identifiable portion of the statement section in said database; utilizing an object oriented computer program to display on a computer monitor a split screen presentation, said split screen having a plurality of parts, in which one part of the split screen has a tree view and another part of the split screen has a list view; displaying in said tree view each element of parsed code as a branch and displaying each statement in each line as a collapsible sub-branch if additional elements exist; selecting a desired target language dialect; utilizing identifiers in said legacy computer program and said selected target language dialect, selecting a corresponding translation program from a translation library; utilizing said translation program, selecting a predefined statement in said translation program that corresponds with each statement and both storing said corresponding predefined statement in a target section of said database and displaying it in said list view part of said split screen in a corresponding line presentation; and repeating said statement selecting and said storing and displaying steps for each parsed statement of legacy computer program until completed for said legacy computer program; whereby said predefined statements comprise a target language version of said legacy computer program that has been stored so that it can be independently run and displayed so that it can be visually checked line by line with said legacy computer program.
The above and other objects and advantages are accomplished in accordance with the present invention by providing an improved software rehosting system and method as described in the following description and drawings, which also set forth, or would be obvious from, additional objects, advantages and features.